# Contributor: Newbyte <newbyte@postmarketos.org>
# Maintainer: team/gnome <newbyte@postmarketos.org>
pkgname=loupe
pkgver=47.1
pkgrel=0
pkgdesc="Image viewer application written with GTK 4 and Rust"
url="https://gitlab.gnome.org/GNOME/loupe"
# s390x: Multple definitions in Cargo dependency Nix 0.26.2
# loongarch64: blocked by glycin-loaders
arch="all !s390x !loongarch64"
license="GPL-3.0-or-later"
depends="glycin-loaders"
makedepends="
	cargo
	desktop-file-utils
	glib-dev
	gtk4.0-dev
	itstool
	lcms2-dev
	libadwaita-dev
	libgweather4-dev
	libseccomp-dev
	meson
	"
checkdepends="appstream-glib desktop-file-utils"
subpackages="$pkgname-lang"
source="https://gitlab.gnome.org/GNOME/loupe/-/archive/$pkgver/loupe-$pkgver.tar.gz"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
b716e6fc9c06b11c05384b081ee7e7559b4c77f1fc9583adff001bd50b60d0a22c9b3b4000f6ee91f9c169dfe87ba532c20edd60f158ca46b227d81d2c2020b8  loupe-47.1.tar.gz
"
